﻿package com.kuanter.kuanterauto.utils;

import android.app.Activity;
import android.app.PendingIntent;
import android.content.Intent;
import android.telephony.SmsManager;

public class SendSmsUtil {
	private Activity activity ;
	
	public SendSmsUtil(Activity activity) {
		this.activity = activity;
	}

	public void sendSms(String sendToPhone,String authCode){
		SmsManager smsManager = SmsManager.getDefault();
		PendingIntent sentIntent = PendingIntent.getBroadcast(activity, 0, new Intent("SMS_SENT"), 0); 
		PendingIntent deliveryIntent = PendingIntent.getBroadcast(activity, 0, new Intent("SMS_DELIVERED"), 0); 
		smsManager.sendTextMessage(sendToPhone, null, authCode, sentIntent, deliveryIntent) ;
	}
}
